<template>
  <OjContainer :showLeftAside="true" :showRightAside="true">
    <template v-slot:left-aside>
      <div>
        <el-radio-group v-model="isCollapse" style="margin-bottom: 20px;">
          <el-radio-button :label="false">展开</el-radio-button>
          <el-radio-button :label="true">收起</el-radio-button>
        </el-radio-group>
        <el-menu
            :collapse="isCollapse"
            :default-active="activeMenu"
            @close="handleClose"
            @open="handleOpen"
            @select="handleSelect">
          <el-menu-item index="1">
            <i class="el-icon-setting"></i>
            <span slot="title">讨论主题一</span>
          </el-menu-item>
          <el-menu-item index="2">
            <i class="el-icon-setting"></i>
            <span slot="title">讨论主题二</span>
          </el-menu-item>
          <el-menu-item index="3">
            <i class="el-icon-setting"></i>
            <span slot="title">讨论主题三</span>
          </el-menu-item>
          <el-menu-item index="4">
            <i class="el-icon-setting"></i>
            <span slot="title">讨论主题四</span>
          </el-menu-item>
        </el-menu>
      </div>
    </template>
    <template v-slot:main>
      <div>
        <p>搜索框</p>
      </div>
      <div>
        <p>讨论卡片...</p>
      </div>
    </template>
    <template v-slot:right-aside>
      <div>
        <p>评论区弹窗...</p>
      </div>
    </template>
  </OjContainer>
</template>

<script>
import OjContainer from '@/components/OjContainer.vue';
export default {
  components: {
    OjContainer
  },
  data() {
    return {
      isCollapse: false
    };
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    }
  }
}
</script>

<style scoped>
/* 导航展开按钮 */
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 200px;
  min-height: 400px;
}
</style>